Skip to content

refactor(select2,date-input,component-loader): migrate from webpack-o…#46

Merged
thorewi merged 1 commit into
mainfrom
vite
Jun 27, 2026
Merged

refactor(select2,date-input,component-loader): migrate from webpack-o…#46
thorewi merged 1 commit into
mainfrom
vite

Conversation

@AdtMax

@AdtMax AdtMax commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

…nly imports to Vite-compatible equivalents

  • Add Select2/_init.js to invoke the UMD factory against global jQuery, since Vite/Rollup resolves the CommonJS branch which exports an uninvoked factory
  • Replace import 'select2/dist/js/select2.full' with the new _init module
  • Replace script-loader!timepicker with a plain side-effect import in DateInput
  • Replace webpack dynamic require for flatpickr locales with import.meta.glob
  • Rewrite ComponentLoader to use caller-registered import.meta.glob maps instead of concatenated dynamic import strings that Vite cannot statically analyse
  • Replace require(\"scrollparent\") with ESM import in SubmitForm

…nly imports to Vite-compatible equivalents

- Add Select2/_init.js to invoke the UMD factory against global jQuery, since
  Vite/Rollup resolves the CommonJS branch which exports an uninvoked factory
- Replace `import 'select2/dist/js/select2.full'` with the new _init module
- Replace `script-loader!timepicker` with a plain side-effect import in DateInput
- Replace webpack dynamic require for flatpickr locales with import.meta.glob
- Rewrite ComponentLoader to use caller-registered import.meta.glob maps instead
  of concatenated dynamic import strings that Vite cannot statically analyse
- Replace `require(\"scrollparent\")` with ESM import in SubmitForm
@thorewi thorewi merged commit 69fc756 into main Jun 27, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants